#!/bin/sh
pid=`ss -lpnt|grep 8889|awk '{print $6}'|awk -F, '{print $2}'|awk -F= '{print $2}'`
#echo $pid

   if [ -n "$pid" ]
   then
    {
      sleep 1 
#      echo ========kill opac 8889==============  
      kill -9 $pid
    }
fi
pid=`ss -lpnt|grep 8889|awk '{print $6}'|awk -F, '{print $2}'|awk -F= '{print $2}'`
#echo $pid
if [ ! -n "$pid" ]
   then
   {
     sleep 1 
#     echo ===========startup.sh==============
	 cd /opt/opac3.5/
     nohup sh startup.sh > ./nohup-out/nohup.out.`date +%Y%m%d`  2>&1 &
}
fi
